/**
 * Copyright 2020 Inc.
 **/
package com.myz.cloud.stream.rocketmq.consumer.controller;

import com.myz.cloud.stream.rocketmq.consumer.stream.StreamOutputChannel;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author maoyz0621 on 2020/8/17
 * @version v1.0
 */
@RestController
public class RocketMQStreamController {

    @Resource
    StreamOutputChannel streamOutputChannel;

    @GetMapping(value = "/send")
    public String send() {
        streamOutputChannel.output().send(MessageBuilder.withPayload("hello ").build());
        return null;
    }


}